#pragma once

//#include "StdAfx.h"

enum Electordes {A1,FP1,F3,F7,C3,T3,P3,T5,O1,A2,FP2,F4,F8,C4,T4,P4,T6,O2,FZ,CZ,PZ,OZ};
enum Regions {Left=1,Right=2,LeftF=4,RightF=8,Center=16,Vertex=32,LeftO=64,RightO=128};


struct Electrode{
   int electrodeID;
   unsigned int region;
   TCHAR name[32];
   Electrode(int id)
   {      
           region=0;
	      if(id==C3 || id==C4)
	     	  region|=Center;
          if(id==P3 || id==P4)
			  region|=Vertex;
		  if(id==O1)
			  region|=LeftO;
		  if(id==O2)
			  region|=RightO;
		  if(id>=A1 && id<=O1)
			  region|=Left;
		  else if(id>=A2 && id<=O2)
			  region|=Right;
          if(id>=FP1 && id<=F7)
			  region|=LeftF;
		  else if(id>=FP2 && id<=F8)
			  region|=RightF;

		  switch(id){
			  case A1:  _tcscpy(name,L"A1");
		                break;
			  case A2:  _tcscpy(name,L"A2");
			            break;
			  case FP1: _tcscpy(name,L"FP1");;
				        break;
			  case FP2: _tcscpy(name,L"FP2");
				        break;
			  case F3:  _tcscpy(name,L"F3");
				        break;
			  case F4:  _tcscpy(name,L"F4");
				        break;
			  case F7:  _tcscpy(name,L"F7");
				        break;
			  case F8:  _tcscpy(name,L"F8");
			            break;
			  case C3:  _tcscpy(name,L"C3");
				        break;
			  case C4:  _tcscpy(name,L"C4");
			            break;
			  case T3:  _tcscpy(name,L"T3");
				        break;
			  case T4:  _tcscpy(name,L"T4");
				        break;
			  case T5:  _tcscpy(name,L"T5");
				        break;
			  case T6:  _tcscpy(name,L"T6");
				        break;
			  case O1:  _tcscpy(name,L"O1");
				        break;
			  case O2:  _tcscpy(name,L"O2");
				        break;
			  case FZ:  _tcscpy(name,L"FZ");
				        break;
			  case CZ:  _tcscpy(name,L"CZ");
				        break;
			  case PZ:  _tcscpy(name,L"PZ");
				        break;
			  case OZ:  _tcscpy(name,L"OZ");
				        break;
			  default:  
				  _tcscpy(name,L"UNKNOWN");
				  break;
		  }
   }

};
